package com.example.wechattakeaway.mapper;

import com.example.wechattakeaway.entity.OrderSupply;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface OrderSupplyMapper {

    /*
    增加一个订单补充
    @param orderDetailId,Content
    @return null
     */
    Integer InsertSupply(@Param("orderDetailId") Integer orderDetailId,@Param("content") String content);

    /*
    根据id精确查询
    @param supplyId
    @return OrderSupply
     */
    OrderSupply SelectSupplyById(Integer supplyId);

    /*
    根据订单详情id查询该订单所有补充内容
    @param orderDetailId
    @return
     */
    List<OrderSupply> SelectAllByOrder(Integer orderDetailId);

}
